package com.ck.ck_back.dao;

import com.ck.ck_back.pojo.Comment;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CommentMapper {
    int deleteByPrimaryKey(Integer commentId);

    int insert(Comment record);

    int insertSelective(Comment record);

    Comment selectByPrimaryKey(Integer commentId);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

//    根据文章id，查询所有的评论
    List<Comment> selectByProductionId_null(int production_id);

    List<Comment> select_notnull(int commentId);

    //       查询文章所有的评论总和
    int select_count_comment(int production_id);

    List<Comment> select_all(int commentId);
}